RemoteInput

Helper for using the android.app.RemoteInput.

Types

Link copied to clipboard
class Builder
Builder class for androidx.core.app.RemoteInput objects.
Link copied to clipboard

Properties

Link copied to clipboard
The platform will determine whether choices will be edited before being sent to the app.
Link copied to clipboard
Tapping on a choice should send the input immediately, without letting the user edit it.
Link copied to clipboard
Tapping on a choice should let the user edit the input before it is sent to the app.
Link copied to clipboard
val EXTRA_RESULTS_DATA: String = "android.remoteinput.resultsData"
Extra added to a clip data intent object to hold the text results bundle.
Link copied to clipboard
val RESULTS_CLIP_LABEL: String = "android.remoteinput.results"
Label used to denote the clip data type used for remote input transport
Link copied to clipboard
The user selected one of the choices from getChoices.
Link copied to clipboard
The user manually entered the data.

Functions

Link copied to clipboard
open fun addDataResultToIntent(@NonNull remoteInput: @NonNull RemoteInput, @NonNull intent: @NonNull Intent, @NonNull results: @NonNull Map<String, Uri>)
Same as addResultsToIntent but for setting data results.
Link copied to clipboard
open fun addResultsToIntent(remoteInputs: @NonNull Array<RemoteInput>, @NonNull intent: @NonNull Intent, @NonNull results: @NonNull Bundle)
Populate an intent object with the results gathered from remote input.
Link copied to clipboard
@Nullable
open fun getAllowedDataTypes(): @Nullable Set<String>
Link copied to clipboard
Get whether or not users can provide an arbitrary value for input.
Link copied to clipboard
open fun getChoices(): @Nullable Array<CharSequence>
Get possible input choices.
Link copied to clipboard
@Nullable
open fun getDataResultsFromIntent(@NonNull intent: @NonNull Intent, @NonNull remoteInputResultKey: @NonNull String): @Nullable Map<String, Uri>
Similar as getResultsFromIntent but retrieves data results for a specific RemoteInput result.
Link copied to clipboard
Gets whether tapping on a choice should let the user edit the input before it is sent to the app.
Link copied to clipboard
@NonNull
open fun getExtras(): @NonNull Bundle
Get additional metadata carried around with this remote input.
Link copied to clipboard
@Nullable
open fun getLabel(): @Nullable CharSequence
Get the label to display to users when collecting this input.
Link copied to clipboard
@NonNull
open fun getResultKey(): @NonNull String
Get the key that the result of this input will be set in from the Bundle returned by getResultsFromIntent when the android.app.PendingIntent is sent.
Link copied to clipboard
@Nullable
open fun getResultsFromIntent(@NonNull intent: @NonNull Intent): @Nullable Bundle
Get the remote input text results bundle from an intent.
Link copied to clipboard
open fun getResultsSource(@NonNull intent: @NonNull Intent): Int
Get the source of the RemoteInput results.
Link copied to clipboard
open fun isDataOnly(): Boolean
Returns true if the input only accepts data, meaning getAllowFreeFormInput is false, getChoices is null or empty, and getAllowedDataTypes is non-null and not empty.
Link copied to clipboard
open fun setResultsSource(@NonNull intent: @NonNull Intent, source: Int)
Set the source of the RemoteInput results.